$strExtract = Substr ( <string>,
<start index>, [len] )
Extracts a substring
from <string>.
Parameters
<string>
Main string parameter.
<start index>
Start position.
[len] Number
of characters to be extracted.
Return Value
Returns the extracted
substring.
Remarks
- Extracts a substring
of length [len] characters from the string <string>, counting
from the position <start index> which is a zero-based index. The function
returns a copy of the extracted substring.
Example
$a = "ABCD"
$b = Substr($a,1,2)
$a = "ABCDEFG"
$b = Substr($a,3)
$a = "ABCDEFGH"
$b = Substr($a,3)